package com.example.b_308.office.view.base;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.LayoutRes;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.LayoutInflater;
import android.widget.LinearLayout;
import com.example.b_308.medical.R;
import com.example.b_308.office.view.title.TitleBar;

/**
 * Created by xxtves on 2017/11/17.
 */

public class BaseActivity extends AppCompatActivity {
    LinearLayout ll;
    TitleBar titleBar;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        super.setContentView(R.layout.activity_base);
//        ll=findViewById();
    }

    @Override
    public void setContentView(@LayoutRes int layoutResID) {
        ll.addView(LayoutInflater.from(this).inflate(layoutResID,null));
    }

    public void tentTo(Class cLass){
        startActivity(new Intent(this,cLass));
    }

    public TitleBar getTitleBar() {
        return titleBar;
    }
}
